﻿using System;
using System.Collections.Generic;
using System.Text;

namespace Gargoyle.ZZT
{
    class ReferenceByte
    {
        private byte val;

        public ReferenceByte(byte newValue)
        {
            val = newValue;
        }

        public static implicit operator byte(ReferenceByte src)
        {
            return src.val;
        }

        public static implicit operator ReferenceByte(byte src)
        {
            return new ReferenceByte(src);
        }
    }

    class ReferenceInt16
    {
        private Int16 val;

        public ReferenceInt16(Int16 newValue)
        {
            val = newValue;
        }

        public static implicit operator Int16(ReferenceInt16 src)
        {
            return src.val;
        }

        public static implicit operator ReferenceInt16(Int16 src)
        {
            return new ReferenceInt16(src);
        }
    }

    class ReferenceInt32
    {
        private Int32 val;

        public ReferenceInt32(Int32 newValue)
        {
            val = newValue;
        }

        public static implicit operator Int32(ReferenceInt32 src)
        {
            return src.val;
        }

        public static implicit operator ReferenceInt32(Int32 src)
        {
            return new ReferenceInt32(src);
        }
    }
}
